package com.alex.controller.api;

import com.alex.service.BookService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class BookAPI {

    @Resource
    private BookService bookService;

    @ResponseBody
    @RequestMapping("/api/book/list")
    public Object getBookList() {
        return bookService.getAll();
    }
}
